# http://127.0.0.1:8000/useragent/

# import requests
# import random
#
# uas = [
#     "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36",
#     "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:144.0) Gecko/20100101 Firefox/144.0",
#     "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Mobile Safari/537.36 Edg/141.0.0.0"
# ]
#
# headers = {
#     "User-Agent": random.choice(uas),
# }
# res = requests.get("http://127.0.0.1:8000/useragent/", headers=headers)
#
# print(res.text)



# import requests
# from fake_useragent import UserAgent
# ua = UserAgent()
# headers = {
#     "User-Agent":ua.random,
# }
# res = requests.get("http://127.0.0.1:8000/useragent/", headers=headers)
# print(res.text)





# import requests
# headers = {
#     # "cookie": "sessionid=ahlgbaljgnjsogjlsgkoegkeng"
# }
# cookies = {
#     'sessionid': 'ahlgbaljgnjsogjlsgkoegkeng',
# }
# res = requests.get("http://127.0.0.1:8000/cookie/", headers=headers, cookies=cookies)
# print(res.text)


import requests

headers = {
    "referer": "http://127.0.0.1:8000/news"
}
res = requests.get("http://127.0.0.1:8000/referer/", headers=headers)
print(res.text)
